package com.xuedian.xuanxuan.web.model;

import java.util.Date;

/**
 * token
 * Created by mmh on 2016/11/12.
 */
public class Token {

    private Long id;

    private Long userId;//用户ID

    private String token;//用户接口访问唯一标识：userID+operationTime生成

    private Date operationTime;//登录时间

    public Token() {
    }

    public Token(Long userId, Date operationTime) {
        this.userId = userId;
        this.operationTime = operationTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Date getOperationTime() {
        return operationTime;
    }

    public void setOperationTime(Date operationTime) {
        this.operationTime = operationTime;
    }

    @Override
    public String toString() {
        return "Token [id=" + id + ", userId=" + userId + ", token=" + token + ", operationTime=" + operationTime + "]";
    }
}
